package com.gy.api;


import com.aaa.vo.Result;
import com.gy.service.CarHistoryBackFeeService;
import com.gy.vo.OrderChargeDtoListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author GaoYa
 * @Date 2023/4/2 15:44
 * @Version 1.5
 */

@RestController
@RequestMapping("/charge/api/")
public class CarHistoryBackFeeController {
    @Autowired
    private CarHistoryBackFeeService carHistoryBackFe;

    /**
     * 微信收费
     */
    @PostMapping("ZFBOrder")
    public Result ZFBOrder(@RequestBody OrderChargeDtoListVo orderChargeDtoListVo){
        return carHistoryBackFe.ZFBOrder(orderChargeDtoListVo);
    }

    /**
     * 根据微信订单id设置已支付
     */

    @PostMapping("queryDataAll/{orderId}")
    public Result queryDataAll(@PathVariable String orderId){
        return carHistoryBackFe.queryDataAll(orderId);
    }

    /**
     * 微信退费
     */
    @PostMapping("ZFBBackFee")
    public Result ZFBBackFee(@RequestBody OrderChargeDtoListVo orderChargeDtoListVo){
        return carHistoryBackFe.ZFBBackFee(orderChargeDtoListVo);
    }

}
